package com.gao.controller;
import java.util.Date;

import com.gao.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author gao
 * @time 2020/06/14 16:33:41
 */
@Controller
@RequestMapping("users")
public class UserController {
    @RequestMapping("save")
    public String save(Model model) {
        User user = new User();
        user.setId(10);
        user.setName("foo");
        user.setBirthday(new Date());
        user.setBalance(100.0D);
        model.addAttribute("user", user);
        System.out.println("UserController.save");
        return "index";
    }
}
